from pydantic import BaseModel, Field

# 定义结构化输出格式（符合 Pydantic 的 Schema）
class ProductTitle(BaseModel):
    keyword: str = Field(..., description="用户提供的商品关键词")
    title: str = Field(..., min_length=20, max_length=30, description="生成的商品标题，不超过30字")

class ProductMarkdown(BaseModel):
    title: str = Field(..., min_length=20, max_length=30, description="简洁商品标题")
    description: str = Field(..., description="商品详情，Markdown 格式")